#include<bits/stdc++.h>
using namespace std;
void solve(){
	int n;
	cin >> n;
	int sum = 0;
	for(int i = 1;i <= n;i++){
		int temp;
		cin >> temp;
		sum += abs(temp);
	}
	cout << sum << "\n";
}
int main(){
	ios::sync_with_stdio(false),cin.tie(0);
	int t;
	cin >> t;
	while(t--) solve();
}